Conversation
|
Cool, I think it's worth creating the image since it makes the workflow easier! In your simplified GitHub actions example, I think we'll still have to do the "generate" bit. |
|
So I'm curious about the choice to make techdocs-cli the entrypoint... if you just made this bash then the user could run consecutive commands against a container... I'm using codefresh so it will be a bit different but then you can do something like this generate-and-publish-docs:
title: Publish Docs to S3 Bucket
stage: deploy
image: backstage-techdocs
working_directory: "${{clone}}"
commands:
- techdocs-cli generate --no-docker
- techdocs-cli publish --publisher-type awsS3 --storage-name bucket --entity entity |
|
Aha, that's an interesting approach! |
|
@rgbrizzlehizzle that would work too. I'm going to set it up with our Jenkins setup and see how it works. |
|
We build such an image on our own to run it on Jenkins and on GitHub Actions (seems to be much faster than installing everything). This is what we are using: FROM spotify/techdocs:v0.2.0
RUN apk add --update nodejs npm && npm install -g @techdocs/cli
# The jenkins requires that no entrypoint is set
ENTRYPOINT [""]Is there anything blocking us from providing a |
Motivation
I need to integrate techdocs-cli into our Jenkins pipeline. We have the ability to run any docker container image. Other CI tools like GitHub Actions and CircleCI also have the same ability. We can also install executables as part of the CI process but this adds build time overhead to each CI job. Instead, I would like to be able use techdoc-cli that is distributed as a container image.
I created a spike to see what this would look here.
Approach
You can build this image with,
This will create a local image that you can use to run your CLI. To use this image,
This will execute execute build command on your techdocs-cli within the docker container.
This base image could be used to create a GitHub Action for techdocs-cli. This would simplify the workflow script from
to something like this,
Note: this probably wouldn't be the arguments that the action would accept but it makes for a better comparison.